package values.avatar
{
import core.Language;

import flash.errors.IllegalOperationError;
import flash.utils.Dictionary;

import values.common.IAvatarBasicProperty;
import values.skill.SkillTemplateValue;
import values.skill.SkillTemplateValueList;

/**
 * AvatarTemplateValue
 * @author jliang
 *
 */
public class AvatarTemplateValue implements IAvatarBasicProperty
{
	///////////////////////////////////////// Basic ///////////////////////////////////////
	
	[Data(type="field", mapping="@key")]
	public var key:String;
	
	[Data(type="field", mapping="@type")]
	public var type:String;
	
	public function get avatarType():AvatarTypeValue
	{
		return AvatarTypeValueList.getByKey(type);
	}
	
	[Data(type="field", mapping="@name")]
	public var baseNameKey:String;
	
	public function get name():String
	{
		return Language.getText(baseNameKey);
	}
	
	[Data(type="field", mapping="@desc")]
	public var baseDescKey:String;
	
	public function get desc():String
	{
		return Language.getText(baseDescKey);
	}
	
	public function get dynamicClassRef():Class
	{
		throw new IllegalOperationError("dynamicClassRef getter should be overrided.");
	}
	
	[Data(type="field" , mapping="@ai")]
	public var ai:int = 0;
	
	protected var _assets:Dictionary;
	
	public function get assets():Dictionary
	{
		return _assets;
	}
	
	[Data(type="mapping", 
			  mapping="assets.asset", 
			  ref="values.avatar.AvatarAssetValue",
			  way="one_to_more",
			  object="flash.utils.Dictionary",
	          key="@key")]
	public function set assets(value:Dictionary):void
	{
		_assets = value;
	}
	
	public function getSkinAssetByLevel(value:int = 0):AvatarAssetValue
	{
		return getAssetByKey("skin_" + value);
	}
	
	public function getAssetByKey(key:String):AvatarAssetValue
	{
		return assets[key];
	}
	
	protected var _actions:Dictionary;
	
	public function get actions():Dictionary
	{
		return _actions;
	}
	
	[Data(type="mapping", 
			  mapping="actions.action", 
			  ref="values.avatar.AvatarActionValue",
			  way="one_to_more",
			  object="flash.utils.Dictionary",
	          key="@key")]
	public function set actions(value:Dictionary):void
	{
		_actions = value;
	}	
	
	public function getActionByKey(key:String):AvatarActionValue
	{
		return actions[key];
	}
	
	///////////////////////////////////////// Property ///////////////////////////////////////
	/**
	 * 性别    0 -> 女;    1 -> 男 
	 * @return 
	 * 
	 */	
	protected var _gender:int;
	
	[Data(type="field", mapping="property.gender")]
	public function set gender(value:int):void
	{
		_gender = value;
	}
	
	public function get gender():int
	{
		return _gender;
	}
	
	public function get isMale():Boolean
	{
		return gender == 1;
	}
	
	/**
	 * 最大生命值 
	 * @param value
	 * 
	 */	
	protected var _maxHP:Number = 0;
	
	[Data(type="field", mapping="property.max_hp")]
	public function set maxHP(value:Number):void
	{
		_maxHP = value;
	}
	
	public function get maxHP():Number
	{
		return _maxHP;
	}
	
	/**
	 * 初始能量值 
	 * @param value
	 * 
	 */	
	protected var _initMP:Number = 0;
	
	[Data(type="field", mapping="property.init_mp")]
	public function set initMP(value:Number):void
	{
		_initMP = value;
	}
	
	public function get initMP():Number
	{
		return _initMP;
	}
	
	/**
	 * 攻击距离 
	 */	
	protected var _distance:int;
	
	public function get distance():int
	{
		return _distance;
	}
	
	[Data(type="field", mapping="property.distance")]
	public function set distance(value:int):void
	{
		_distance = value;
	}
	
	/**
	 * 能量恢复效率 
	 * @param value
	 * 
	 */	
	protected var _mpRecover:Number = 0;
	
	[Data(type="field", mapping="property.mp_recover")]
	public function set mpRecover(value:Number):void
	{
		_mpRecover = value;
	}
	
	public function get mpRecover():Number
	{
		return _mpRecover;
	}
	
	/**
	 *  战斗
	 * @return 
	 * 
	 */	
	protected var _normalPower:Number = 0;
	
	[Data(type="field", mapping="property.normal_power")]
	public function set normalPower(value:Number):void
	{
		_normalPower = 0;
	}
	
	public function get normalPower():Number
	{
		return _normalPower;
	}
	
	/**
	 *  特技
	 * @return 
	 * 
	 */	
	protected var _skillPower:Number = 0;
	
	[Data(type="field", mapping="property.skill_power")]
	public function set skillPower(value:Number):void
	{
		_skillPower = value;
	}
	
	public function get skillPower():Number
	{
		return _skillPower;
	}
	
	/**
	 *  元素
	 * @return 
	 * 
	 */	
	protected var _elementPower:Number = 0;
	
	[Data(type="field", mapping="property.element_power")]
	public function set elementPower(value:Number):void
	{
		_elementPower = value;
	}
	
	public function get elementPower():Number
	{
		return _elementPower;
	}
	
	/**
	 *  物理防御
	 * @return 
	 * 
	 */	
	protected var _normalDefense:Number = 0;
	
	[Data(type="field", mapping="property.normal_defense")]
	public function set normalDefense(value:Number):void
	{
		_normalDefense = value;
	}
	
	public function get normalDefense():Number
	{
		return _normalDefense;
	}
	
	/**
	 *  特技防御
	 * @return 
	 * 
	 */	
	protected var _skillDefense:Number = 0;
	
	[Data(type="field", mapping="property.skill_defense")]
	public function set skillDefense(value:Number):void
	{
		_skillDefense = value;
	}
	
	public function get skillDefense():Number
	{
		return _skillDefense;
	}
	
	/**
	 *  元素防御
	 * @return 
	 * 
	 */	
	protected var _elementDefense:Number = 0;
	
	[Data(type="field", mapping="property.element_defense")]
	public function set elementDefense(value:Number):void
	{
		_elementDefense = value;
	}
	
	public function get elementDefense():Number
	{
		return _elementDefense;
	}
	
	/**
	 *  物理攻击
	 * @return 
	 * 
	 */	
	protected var _normalDamage:Number = 0;
	
	[Data(type="field", mapping="property.normal_damage")]
	public function set normalDamage(value:Number):void
	{
		_normalDamage = value;
	}
	
	public function get normalDamage():Number
	{
		return _normalDamage;
	}
	
	/**
	 *  特技攻击
	 * @return 
	 * 
	 */	
	protected var _skillDamage:Number = 0;
	
	[Data(type="field", mapping="property.skill_damage")]
	public function set skillDamage(value:Number):void
	{
		_skillDamage = value;
	}
	
	public function get skillDamage():Number
	{
		return _skillDamage;
	}
	
	/**
	 *  元素攻击
	 * @return 
	 * 
	 */	
	protected var _elementDamage:Number = 0;
	
	[Data(type="field", mapping="property.element_damage")]
	public function set elementDamage(value:Number):void
	{
		_elementDamage = value;
	}
	
	public function get elementDamage():Number
	{
		return _elementDamage;
	}
		
	/**
	 *  移动力
	 * @return 
	 * 
	 */	
	protected var _moveCapability:Number = 0;
	
	[Data(type="field", mapping="property.move_capability")]
	public function set moveCapability(value:Number):void
	{
		_moveCapability = value;
	}

	public function get moveCapability():Number
	{
		return _moveCapability;
	}
	
	/**
	 *  命中等级
	 * @return 
	 * 
	 */	
	protected var _hitRate:Number = 0;
	
	[Data(type="field", mapping="property.hit_rate")]
	public function set hitRate(value:Number):void
	{
		_hitRate = value;
	}
	
	public function get hitRate():Number
	{
		return _hitRate;
	}
	
	/**
	 *  闪避等级
	 * @return 
	 * 
	 */	
	protected var _dodgeRate:Number = 0;
	
	[Data(type="field", mapping="property.dodge_rate")]
	public function set dodgeRate(value:Number):void
	{
		_dodgeRate = value;
	}
	
	public function get dodgeRate():Number
	{
		return _dodgeRate;
	}
	
	/**
	 *  穿透等级
	 * @return 
	 * 
	 */	
	protected var _penetrateRate:Number = 0;
	
	[Data(type="field", mapping="property.penetrate_rate")]
	public function set penetrateRate(value:Number):void
	{
		_penetrateRate = value;
	}
	
	public function get penetrateRate():Number
	{
		return _penetrateRate;
	}
	
	/**
	 *  抵抗等级
	 * @return 
	 * 
	 */	
	protected var _resistRate:Number = 0;
	
	[Data(type="field", mapping="property.resist_rate")]
	public function set resistRate(value:Number):void
	{
		_resistRate = value;
	}
	
	public function get resistRate():Number
	{
		return _resistRate;
	}
	
	/**
	 *  强攻等级
	 * @return 
	 * 
	 */	
	protected var _enforceRate:Number = 0;
	
	[Data(type="field", mapping="property.enforce_rate")]
	public function set enforceRate(value:Number):void
	{
		_enforceRate = value;
	}
	
	public function get enforceRate():Number
	{
		return _enforceRate;
	}
	
	/**
	 *  抵挡等级
	 * @return 
	 * 
	 */	
	protected var _blockRate:Number = 0;
	
	[Data(type="field", mapping="property.block_rate")]
	public function set blockRate(value:Number):void
	{
		_blockRate = value;
	}
	
	public function get blockRate():Number
	{
		return _blockRate;
	}
	
	/**
	 *  抵挡力
	 * @return 
	 * 
	 */	
	protected var _blockEffect:Number = 0;
	
	[Data(type="field", mapping="property.block_effect")]
	public function set blockEffect(value:Number):void
	{
		_blockEffect = value;
	}
	
	public function get blockEffect():Number
	{
		return _blockEffect;
	}
	
	/**
	 *  强韧等级
	 * @return 
	 * 
	 */	
	protected var _toughness:Number = 0;
	
	[Data(type="field", mapping="property.toughness")]
	public function set toughness(value:Number):void
	{
		_toughness = value;
	}
	
	public function get toughness():Number
	{
		return _toughness;
	}
	
	/**
	 *  暴击等级
	 * @return 
	 * 
	 */	
	protected var _critRate:Number = 0;
	
	[Data(type="field", mapping="property.crit_rate")]
	public function set critRate(value:Number):void
	{
		_critRate = value;
	}
	
	public function get critRate():Number
	{
		return _critRate;
	}
	
	/**
	 *  暴击伤害加成
	 * @return 
	 * 
	 */	
	protected var _critEffect:Number = 0;
	
	[Data(type="field", mapping="property.crit_effect")]
	public function set critEffect(value:Number):void
	{
		_critEffect = value;
	}
	
	public function get critEffect():Number
	{
		return _critEffect;
	}
	
	/**
	 *  暴击伤害加成
	 * @return 
	 * 
	 */	
	protected var _defenseRate:Number = 0;
	
	[Data(type="field", mapping="property.defense_rate")]
	public function set defenseRate(value:Number):void
	{
		_defenseRate = value;
	}
	
	public function get defenseRate():Number
	{
		return _defenseRate;
	}
	
	/**
	 *  暴击伤害加成
	 * @return 
	 * 
	 */	
	protected var _suppressRate:Number = 0;
	
	[Data(type="field", mapping="property.suppress_rate")]
	public function set suppressRate(value:Number):void
	{
		_suppressRate = value;
	}
	
	public function get suppressRate():Number
	{
		return _suppressRate;
	}
	
	/**
	 *  暴击伤害加成
	 * @return 
	 * 
	 */	
	protected var _suppressEffect:Number = 0;
	
	[Data(type="field", mapping="property.suppress_effect")]
	public function set suppressEffect(value:Number):void
	{
		_suppressEffect = value;
	}
	
	public function get suppressEffect():Number
	{
		return _suppressEffect;
	}
	
	/**
	 *  生命成长值
	 * @return 
	 * 
	 */	
	protected var _maxHPGrowRate:Number = 0;
	
	[Data(type="field", mapping="property.max_hp_grow_rate")]
	public function set maxHPGrowRate(value:Number):void
	{
		_maxHPGrowRate = value;
	}
	
	public function get maxHPGrowRate():Number
	{
		return _maxHPGrowRate;
	}
	
	/**
	 * 战斗防御成长值 
	 * @return 
	 * 
	 */
	protected var _normalDefenseGrowRate:Number = 0;

	[Data(type="field" , mapping="property.normal_defense_grow_rate")]
	public function set normalDefenseGrowRate(value:Number):void
	{
		_normalDefenseGrowRate = value;
	}
	
	public function get normalDefenseGrowRate():Number
	{
		return _normalDefenseGrowRate;
	}
	
	/**
	 * 技能防御成长值 
	 * @return 
	 * 
	 */	
	protected var _skillDefenseGrowRate:Number = 0;
	
	public function get skillDefenseGrowRate():Number
	{
		return _skillDefenseGrowRate;
	}
	
	[Data(type="field" , mapping="property.skill_defense_grow_rate")]
	public function set skillDefenseGrowRate(value:Number):void
	{
		_skillDefenseGrowRate = value;
	}
	
	/**
	 * 元素防御成长值 
	 * @return 
	 * 
	 */	
	protected var _elementDefenseGrowRate:Number = 0;
	
	public function get elementDefenseGrowRate():Number
	{
		return _elementDefenseGrowRate;
	}
	
	[Data(type="field" , mapping="property.element_defense_grow_rate")]
	public function set elementDefenseGrowRate(value:Number):void
	{
		_elementDefenseGrowRate = value;
	}
	
	/**
	 * 战斗攻击成长值 
	 * @return 
	 * 
	 */	
	protected var _normalDamageGrowRate:Number = 0;
	
	public function get normalDamageGrowRate():Number
	{
		return _normalDamageGrowRate;
	}
	
	[Data(type="field" , mapping="property.normal_damage_grow_rate")]
	public function set normalDamageGrowRate(value:Number):void
	{
		_normalDamageGrowRate = value;
	}
	
	/**
	 * 特技攻击成长值 
	 * @return 
	 * 
	 */	
	protected var _skillDamageGrowRate:Number = 0;
	
	public function get skillDamageGrowRate():Number
	{
		return _skillDamageGrowRate;
	}
	
	[Data(type="field" , mapping="property.skill_damage_grow_rate")]
	public function set skillDamageGrowRate(value:Number):void
	{
		_skillDamageGrowRate = value;
	}
	
	/**
	 * 元素攻击成长值 
	 * @return 
	 * 
	 */	
	protected var _elementDamageGrowRate:Number = 0;
	
	public function get elementDamageGrowRate():Number
	{
		return _elementDamageGrowRate;
	}
	
	[Data(type="field" , mapping="property.element_damage_grow_rate")]
	public function set elementDamageGrowRate(value:Number):void
	{
		_elementDamageGrowRate = value;
	}
	
	/**
	 * 命中等级成长值 
	 * @return 
	 * 
	 */	
	protected var _hitRateGrowRate:Number = 0;
	
	public function get hitRateGrowRate():Number
	{
		return _hitRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.hit_rate_grow_rate")]
	public function set hitRateGrowRate(value:Number):void
	{
		_hitRateGrowRate = value;
	}
	
	/**
	 * 闪避等级成长值 
	 * @return 
	 * 
	 */	
	protected var _dodgeRateGrowRate:Number = 0;
	
	public function get dodgeRateGrowRate():Number
	{
		return _dodgeRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.dodge_rate_grow_rate")]
	public function set dodgeRateGrowRate(value:Number):void
	{
		_dodgeRateGrowRate = value;
	}
	
	/**
	 * 穿透等级成长值 
	 * @return 
	 * 
	 */	
	protected var _penetrateRateGrowRate:Number = 0;
	
	public function get penetrateRateGrowRate():Number
	{
		return _penetrateRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.penetrate_rate_grow_rate")]
	public function set penetrateRateGrowRate(value:Number):void
	{
		_penetrateRateGrowRate = value;
	}
	
	/**
	 * 抵抗等级成长值 
	 * @return 
	 * 
	 */	
	protected var _resistRateGrowRate:Number = 0;
	
	public function get resistRateGrowRate():Number
	{
		return _resistRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.resist_rate_grow_rate")]
	public function set resistRateGrowRate(value:Number):void
	{
		_resistRateGrowRate = value;
	}
	
	/**
	 * 强攻等级成长值 
	 * @return 
	 * 
	 */	
	protected var _enforceRateGrowRate:Number = 0;
	
	public function get enforceRateGrowRate():Number
	{
		return _enforceRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.enforce_rate_grow_rate")]
	public function set enforceRateGrowRate(value:Number):void
	{
		_enforceRateGrowRate = value;
	}
	
	/**
	 * 格挡等级成长值 
	 * @return 
	 * 
	 */	
	protected var _blockRateGrowRate:Number = 0;
	
	public function get blockRateGrowRate():Number
	{
		return _blockRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.block_rate_grow_rate")]
	public function set blockRateGrowRate(value:Number):void
	{
		_blockRateGrowRate = value;
	}
	
	/**
	 * 暴击等级成长值 
	 * @return 
	 * 
	 */	
	protected var _critRateGrowRate:Number = 0;
	
	public function get critRateGrowRate():Number
	{
		return _critRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.crit_rate_grow_rate")]
	public function set critRateGrowRate(value:Number):void
	{
		_critRateGrowRate = value;
	}
	
	/**
	 * 强韧等级成长值 
	 * @return 
	 * 
	 */	
	protected var _toughnessGrowRate:Number = 0;
	
	public function get toughnessGrowRate():Number
	{
		return _toughnessGrowRate;
	}
	
	[Data(type="field" , mapping="property.toughness_grow_rate")]
	public function set toughnessGrowRate(value:Number):void
	{
		_toughnessGrowRate = value;
	}
		
	/**
	 * 压制等级成长值 
	 * @return 
	 * 
	 */	
	protected var _suppressRateGrowRate:Number = 0;
	
	public function get suppressRateGrowRate():Number
	{
		return _suppressRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.suppress_rate_grow_rate")]
	public function set suppressRateGrowRate(value:Number):void
	{
		_suppressRateGrowRate = value;
	}
	
	/**
	 * 御体等级成长值 
	 * @return 
	 * 
	 */	
	protected var _defenseRateGrowRate:Number = 0;
	
	public function get defenseRateGrowRate():Number
	{
		return _defenseRateGrowRate;
	}
	
	[Data(type="field" , mapping="property.defense_rate_grow_rate")]
	public function set defenseRateGrowRate(value:Number):void
	{
		_defenseRateGrowRate = value;
	}
	
	/**
	 * 命中加成 
	 * @return 
	 * 
	 */	
	protected var _hitRateBonus:Number = 0;
	
	public function get hitRateBonus():Number
	{
		return _hitRateBonus;
	}
	
	[Data(type="field" , mapping="property.hit_rate_bonus")]
	public function set hitRateBonus(value:Number):void
	{
		_hitRateBonus = value;
	}
	
	/**
	 * 闪避加成 
	 * @return 
	 * 
	 */	
	protected var _dodgeRateBonus:Number = 0;
	
	public function get dodgeRateBonus():Number
	{
		return _dodgeRateBonus;
	}
	
	[Data(type="field" , mapping="property.dodge_rate_bonus")]
	public function set dodgeRateBonus(value:Number):void
	{
		_dodgeRateBonus = value;
	}
	
	/**
	 * 穿透加成 
	 * @return 
	 * 
	 */	
	protected var _penetrateBonus:Number = 0;
	
	public function get penetrateBonus():Number
	{
		return _penetrateBonus;
	}
	
	[Data(type="field" , mapping="property.penetrate_bonus")]
	public function set penetrateBonus(value:Number):void
	{
		_penetrateBonus = value;
	}
	/**
	 * 抵抗加成 
	 * @return 
	 * 
	 */	
	protected var _resistRateBonus:Number = 0;
	
	public function get resistRateBonus():Number
	{
		return _resistRateBonus;
	}
	
	[Data(type="field" , mapping="property.resist_rate_bonus")]
	public function set resistRateBonus(value:Number):void
	{
		_resistRateBonus = value;
	}
	
	/**
	 * 强攻加成 
	 * @return 
	 * 
	 */	
	protected var _enforceRateBonus:Number = 0;
	
	public function get enforceRateBonus():Number
	{
		return _enforceRateBonus;
	}
	
	[Data(type="field" , mapping="property.enforce_rate_bonus")]
	public function set enforceRateBonus(value:Number):void
	{
		_enforceRateBonus = value;
	}
	/**
	 * 格挡加成 
	 * @return 
	 * 
	 */	
	protected var _blockRateBonus:Number = 0;
	
	public function get blockRateBonus():Number
	{
		return _blockRateBonus;
	}
	
	[Data(type="field" , mapping="property.block_rate_bonus")]
	public function set blockRateBonus(value:Number):void
	{
		_blockRateBonus = value;
	}
	/**
	 * 格挡效果加成 
	 * @return 
	 * 
	 */	
	protected var _blockEffectBonus:Number = 0;
	
	public function get blockEffectBonus():Number
	{
		return _blockEffectBonus;
	}
	
	[Data(type="field" , mapping="property.block_effect_bonus")]
	public function set blockEffectBonus(value:Number):void
	{
		_blockEffectBonus = value;
	}
	/**
	 * 暴击加成 
	 * @return 
	 * 
	 */	
	protected var _critRateBonus:Number = 0;
	
	public function get critRateBonus():Number
	{
		return _critRateBonus;
	}
	
	[Data(type="field" , mapping="property.crit_rate_bonus")]
	public function set critRateBonus(value:Number):void
	{
		_critRateBonus = value;
	}
	/**
	 * 强韧加成 
	 * @return 
	 * 
	 */
	protected var _toughnessRateBonus:Number = 0;
	
	public function get toughnessRateBonus():Number
	{
		return _toughnessRateBonus;
	}
	
	[Data(type="field" , mapping="property.toughness_rate_bonus")]
	public function set toughnessRateBonus(value:Number):void
	{
		_toughnessRateBonus = value;
	}
	/**
	 * 暴击效果加成 
	 * @return 
	 * 
	 */	
	protected var _critEffectBonus:Number = 0;
	
	public function get critEffectBonus():Number
	{
		return _critEffectBonus;
	}
	
	[Data(type="field" , mapping="property.crit_effect_bonus")]
	public function set critEffectBonus(value:Number):void
	{
		_critEffectBonus = value;
	}
	/**
	 * 压制加成 
	 * @return 
	 * 
	 */	
	protected var _suppressRateBonus:Number = 0;
	
	public function get suppressRateBonus():Number
	{
		return _suppressRateBonus;
	}
	
	[Data(type="field" , mapping="property.suppress_rate_bonus")]
	public function set suppressRateBonus(value:Number):void
	{
		_suppressRateBonus = value;
	}
	/**
	 * 御体加成 
	 * @return 
	 * 
	 */	
	protected var _defenseRateBonus:Number = 0;
	
	public function get defenseRateBonus():Number
	{
		return _defenseRateBonus;
	}
	
	[Data(type="field" , mapping="property.defense_rate_bonus")]
	public function set defenseRateBonus(value:Number):void
	{
		_defenseRateBonus = value;
	}
	/**
	 * 压制效果加成 
	 * @return 
	 * 
	 */	
	protected var _suppressEffectBonus:Number = 0;
	
	public function get suppressEffectBonus():Number
	{
		return _suppressEffectBonus;
	}
	
	[Data(type="field" , mapping="property.suppress_effect_bonus")]
	public function set suppressEffectBonus(value:Number):void
	{
		_suppressEffectBonus = value;
	}
	
	
	/**
	 *  先攻值
	 * @return 
	 * 
	 */		
	protected var _actRate:Number = 0;
	
	[Data(type="field", mapping="property.act_rate")]
	public function set actRate(value:Number):void
	{
		_actRate = value;
	}
	
	public function get actRate():Number
	{
		return _actRate;
	}
	
	///////////////////////////////////////////////////////////////////////////////////////////	
	
	protected var _skill:AvatarSkillConfigValue;;
	
	public function get skill():AvatarSkillConfigValue
	{
		return _skill;
	}
	
	[Data(type="mapping", 
		   mapping="skill", 
		   ref="values.avatar.AvatarSkillConfigValue",
		   way="own")]
	public function set skill(value:AvatarSkillConfigValue):void
	{
		_skill = value;
		value.owner = this;
	}
	
	public function hasSkill(key:String):Boolean
	{
		return skill.hasSkill(key);
	}
	
	public function get defaultSkill():SkillTemplateValue
	{
		return SkillTemplateValueList.getByKey(skill.defaultNormalSkill);
	}
}
}



